    function FindProxyForURL(url, host)
    {
        if (isPlainHostName(host)
	   )   
	return "DIRECT";

	if (localHostOrDomainIs(host, "fx.citivelocity.com") ||
            localHostOrDomainIs(host, "primefinance1.citivelocity.com") ||
            localHostOrDomainIs(host, "cdn.citivelocity.com") ||
            localHostOrDomainIs(host, "uat.cdn.citivelocity.com") ||
            localHostOrDomainIs(host, "uatcontent.citivelocity.com") ||
        	localHostOrDomainIs(host, "content.citivelocity.com"))
		return "PROXY hkproxy-t1.apac.nsroot.net:8080";

// RFC12375755 Route the below "citivelocity" sites internally		
        if (dnsDomainIs(host, ".citivelocity.com")
        || shExpMatch(host, "www.citivelocity.com")
        || shExpMatch(host, "portal.citivelocity.com")
        || shExpMatch(host, "uat.citivelocity.com")
        || shExpMatch(host, "stream-intuat.citivelocity.com")
        || shExpMatch(host, "stream-int2.citivelocity.com")
        || shExpMatch(host, "stream-int1.citivelocity.com")
        || shExpMatch(host, "stream-ext1.citivelocity.com")
        || shExpMatch(host, "stream-extuat.citivelocity.com")
        || shExpMatch(host, "geo.ny.citivelocity.com")
        || shExpMatch(host, "geoint-stg.nj.citivelocity.com")
		|| shExpMatch(host, "primefinance.citivelocity.com")
        || shExpMatch(host, "primefinance.contingency.citivelocity.com")
        || shExpMatch(host, "primefinanceintranet.uat.citivelocity.com")
        || shExpMatch(host, "primefinance.uat.citivelocity.com")
	|| shExpMatch(host, "login.citivelocity.com")
	|| shExpMatch(host, "login.dev.citivelocity.com")
	|| shExpMatch(host, "login.qa.citivelocity.com")
	|| shExpMatch(host, "login.uat.citivelocity.com")
		|| dnsDomainIs(host, "static.citivelocity.com"))
        {
        return "DIRECT";
        }

	// test siteadvise.com to local
        if ( dnsDomainIs(host, ".siteadvisor.com") ){
        return "DIRECT";
        }
	  
// NETX360(PERSHING - WM)
// Allows users from Wealth Management to access it via B2B
         // Update History

	   // August 29, 2011 - Scott Leitstein (SL55853)
         //    Added 42 ASPAC thick client subnets to support the relocation of ~100 users for Singapore
         //      ASQ - Asia Square and MDH - MacDonald House
         //      NOTE: All new entries have either ASQ or MDH added to the comment

	   // July 27, 2011 - Scott Leitstein (SL55853)
         //    Added comments ASPAC thick client subnets (HK & SG)
         //    Added Singapore subnet 169.178.169.0/24
         //    Added NAM PROD Citrix subnet 169.173.88.0/24     // PROD (CB00?) -- Southwest

         // June 2, 2011 - Scott Leitstein (SL55853)
         //    Added all ASPAC Citrix subnets
         //    Added all ASPAC Thick clients (HK & Singapore)
         //    Added || myIP.substring(0,11)=="169.161.36."  // NYC - 666 5th Ave

         // March 17, 2011 - Scott Leitstein (SL55853)
         //    Added          || myIP.substring(0,12)=="169.171.116.*     CAP PROD     (CB002) -- Georgetown
         //    Added          || myIP.substring(0,12)=="169.185.167.*     CAP UAT      (CB001) -- Southwest
         //    Added          || myIP.substring(0,11)=="169.193.27.*      CAP PROD/UAT (CB002) -- Tri-State
         //    Added          || myIP.substring(0,9)=="10.25.29.*         Boca Raton -- Thick Clients
    	   //    Removed netxpro.inautix.com               Redundant entry, covered by ".inautix.com"
    	   //    Removed xat-www.netxservice.inautix.com   Redundant entry, covered by ".inautix.com"
    	   //    Organize section based on environment (PROD,UAT, IST)
         //    NOTE: Build groups: CB001 - CAP Desktop  CB002 - CAP XP Desktop 

         var myIP = myIpAddress();

         if ((
         // *** Beginning of ASPAC Citrix environment ***
            myIP.substring(0,10)=="129.14.42."    // PROD CITRIX -- ASPAC - Hong Kong
         || myIP.substring(0,11)=="163.36.253."   // PROD CITRIX -- ASPAC - Singapore
         // *** End of ASPAC Citrix environment ***

         // *** Beginning of ASPAC Thick Client subnets ***
         || myIP.substring(0,11)=="10.107.152."     // Singapore - ASQ
         || myIP.substring(0,11)=="10.107.153."     // Singapore - ASQ
         || myIP.substring(0,11)=="10.107.154."     // Singapore - ASQ
         || myIP.substring(0,11)=="10.107.155."     // Singapore - ASQ
         || myIP.substring(0,11)=="10.107.156."     // Singapore - ASQ
         || myIP.substring(0,11)=="10.107.157."     // Singapore - ASQ
         || myIP.substring(0,11)=="10.107.220."     // Hong Kong - Note: Covers 10.107.220/25 and 10.107.220.128/25
         || myIP.substring(0,11)=="10.187.254."     // Singapore - ASQ
         || myIP.substring(0,10)=="163.37.28."	    // Singapore
         || myIP.substring(0,10)=="163.37.72."      // Singapore
         || myIP.substring(0,11)=="169.165.17."     // Singapore
         || myIP.substring(0,12)=="169.165.226."    // Singapore
         || myIP.substring(0,12)=="169.178.124."    // Singapore
         || myIP.substring(0,12)=="169.178.144."    // Singapore
         || myIP.substring(0,12)=="169.178.162."    // Singapore
         || myIP.substring(0,12)=="169.178.163."    // Singapore
         || myIP.substring(0,12)=="169.178.168."    // Singapore
         || myIP.substring(0,12)=="169.178.169."    // Singapore
         || myIP.substring(0,12)=="169.178.184."    // Singapore
         || myIP.substring(0,12)=="169.178.185."    // Singapore
         || myIP.substring(0,11)=="169.178.29."     // Singapore
         || myIP.substring(0,11)=="169.178.38."     // Singapore
         || myIP.substring(0,11)=="169.178.39."     // Singapore
         || myIP.substring(0,12)=="169.178.203."    // Singapore - MDH
         || myIP.substring(0,12)=="169.178.204."    // Singapore - MDH
         || myIP.substring(0,12)=="169.181.112."    // Hong Kong
         || myIP.substring(0,12)=="169.181.113."    // Hong Kong
         || myIP.substring(0,12)=="169.181.126."    // Hong Kong
         || myIP.substring(0,12)=="169.181.127."    // Hong Kong
         || myIP.substring(0,12)=="169.181.128."    // Hong Kong
         || myIP.substring(0,12)=="169.181.131."    // Hong Kong
         || myIP.substring(0,12)=="169.181.132."    // Hong Kong
         || myIP.substring(0,12)=="169.181.133."    // Hong Kong
         || myIP.substring(0,12)=="169.181.134."    // Hong Kong
         || myIP.substring(0,12)=="169.181.142."    // Hong Kong

         // *** ASPAC Thick clients with alternate Subnetting ***
         || isInNet(myIP,"10.26.248.193","255.255.255.192")   // Singapore - 10.26.248.193/26
         || isInNet(myIP,"10.91.33.128","255.255.255.192")    // Hong Kong - 10.91.33.128/26
         || isInNet(myIP,"10.91.33.192","255.255.255.192")    // Hong Kong - 10.91.33.192/26
         || isInNet(myIP,"10.91.104.0","255.255.248.0")       // Singapore - 10.91.104.0 - 10.91.111.255 - ASQ
         || isInNet(myIP,"10.91.112.0","255.255.248.0")       // Singapore - 10.91.112.0 - 10.91.119.255 - ASQ
         || isInNet(myIP,"10.91.120.0","255.255.248.0")       // Singapore - 10.91.120.0 - 10.91.127.255 - ASQ
         || isInNet(myIP,"10.107.140.0","255.255.254.0"  )    // Singapore - 10.107.140.0/23
         || isInNet(myIP,"10.183.224.193","255.255.255.192")  // Singapore - 10.183.224.193/26
         || isInNet(myIP,"10.183.251.0","255.255.255.128")    // Singapore - 10.183.251.0/25
         || isInNet(myIP,"10.183.255.0","255.255.255.128")    // Singapore - 10.183.255.0/25
         || isInNet(myIP,"10.187.240.128","255.255.255.128")  // Singapore - 10.187.240.128/25
         || isInNet(myIP,"163.36.12.0","255.255.254.0")       // Singapore - 163.36.12.0/23 - ASQ
         || isInNet(myIP,"163.36.14.0","255.255.254.0")       // Singapore - 163.36.14.0/23 - ASQ
         || isInNet(myIP,"169.178.126.0","255.255.254.0")     // Singapore - 169.178.126.0/23 - ASQ
         || isInNet(myIP,"169.178.134.0","255.255.254.0")     // Singapore - 169.178.134.0/23 - ASQ
         || isInNet(myIP,"169.178.136.0","255.255.254.0")     // Singapore - 169.178.136.0/23 - ASQ
         || isInNet(myIP,"169.178.138.0","255.255.254.0")     // Singapore - 169.178.138.0/23 - ASQ
         // *** End of ASPAC Thick Client subnets ***
        )

       &&
           (dnsDomainIs(host, ".netxpro.com")
         || dnsDomainIs(host, ".netxservice.com")
         || dnsDomainIs(host, ".inautix.com")
         || dnsDomainIs(host, "actimize.pershing.com")
         || dnsDomainIs(host, "uit.pershing.com")
         || dnsDomainIs(host, ".netxservice.com")
         || dnsDomainIs(host, ".pllcfiles.com")
         || dnsDomainIs(host, ".netxprodownload.com")
         || dnsDomainIs(host, ".lockwoodadvisors.com")
         || dnsDomainIs(host, ".netx360.com") ) )  {
         return "DIRECT";
        }
// END OF NETX360(PERSHING - WM)

//SUNGARD Proxy CCR 38056.1  RFC 14152115 CCR 38056.2  RFC 14328393
        if (shExpMatch(host, "168.162.105.167")
            || shExpMatch(host, "tasecurityadmin.production.sungard.com")
	    || shExpMatch(host, "citi.enterprise.sungard.com")
            || shExpMatch(host, "citi.dr.enterprise.sungard.com")
	    )
	{
        return "DIRECT";
        }

// RFC 14057230 CIBTech - Global Transaction Services
        if (shExpMatch(host, "163.37.143.27") 
		|| shExpMatch(host, "163.37.143.28")
		|| shExpMatch(host, "129.14.26.23")
		|| shExpMatch(host, "129.14.26.24")
		|| shExpMatch(host, "169.191.102.99")
		|| shExpMatch(host, "169.187.133.163")
		|| shExpMatch(host, "129.14.50.103"))
	{
       	 return "DIRECT";
        }

if (shExpMatch(url, "https://www.amazon.com/clouddrive*")) {
        return "DIRECT";    	
        }

	if (localHostOrDomainIs(host, "www.citicorp.com") ||
            localHostOrDomainIs(host, "mortgages.citicorp.com") ||
            localHostOrDomainIs(host, "mortgagelenders.citicorp.com") ||
            localHostOrDomainIs(host, "asia.citidirect-eb.citicorp.com") ||
            dnsDomainIs(host, "europe.citidirect-eb.citicorp.com") ||
            dnsDomainIs(host, ".paytmenrollment.citicorp.com") ||
            dnsDomainIs(host, ".efsenrollment.citicorp.com") ||
            dnsDomainIs(host, ".naccaenrollment.citicorp.com") ||
            dnsDomainIs(host, "notifications1.citidirect.citicorp.com") ||
            dnsDomainIs(host, "notifications2.citidirect.citicorp.com") ||
            dnsDomainIs(host, "notifications3.citidirect.citicorp.com") ||
            dnsDomainIs(host, "us.citidirect.citicorp.com") ||
            dnsDomainIs(host, ".paytm.citicorp.com") ||
            dnsDomainIs(host, "statements.ssmb.com") ||
            dnsDomainIs(host, "www.gqr.ssmb.com") ||
            dnsDomainIs(host, ".fabtexas.com") ||
            dnsDomainIs(host, ".fabssb") ||
            dnsDomainIs(host, "einfolinx.ssmb.com") ||
            dnsDomainIs(host, "einfolinx-dr.ssmb.com") ||
            dnsDomainIs(host, ".dovico.net") ||
            dnsDomainIs(host, ".orbian.com") ||
            dnsDomainIs(host, ".citibank.com"))
		return "PROXY hkproxy-t1.apac.nsroot.net:8080";

        if (localHostOrDomainIs(host, "wes.citicorp.com") ||
            localHostOrDomainIs(host, "ssunp11.aspac.citicorp.com") ||
            localHostOrDomainIs(host, "ssunp06.aspac.citicorp.com") ||
            localHostOrDomainIs(host, "ssunp07.aspac.citicorp.com") ||
            localHostOrDomainIs(host, "edealerpl.pl.citicorp.com") ||
            localHostOrDomainIs(host, "namemsolas006.corp.afcc.com") ||
            localHostOrDomainIs(host, "namemsolas007.corp.afcc.com") ||
            localHostOrDomainIs(host, "sgtpkss1.apac.nsroot.net") ||
            localHostOrDomainIs(host, "sgtpkss2.apac.nsroot.net") ||
            localHostOrDomainIs(host, "sgct2ss1.apac.nsroot.net") ||
            localHostOrDomainIs(host, "sgct2ss2.apac.nsroot.net") ||
            localHostOrDomainIs(host, "safe.apac.nsroot.net") ||
            localHostOrDomainIs(host, "smartflow-pkr.apac.nsroot.net") ||
            localHostOrDomainIs(host, "koram-aceware.apac.nsroot.net") ||
            localHostOrDomainIs(host, "samsung-insurance-prod.apac.nsroot.net") ||
            localHostOrDomainIs(host, "citivision.ny.ssmb.com") ||
            localHostOrDomainIs(host, "tears.nj.ssmb.com") ||
            localHostOrDomainIs(host, "emapp228.sinprd.sg.citicorp.com") ||
            localHostOrDomainIs(host, "emapp030.sinprd.sg.citicorp.com") ||
            localHostOrDomainIs(host, "dealtracker.aus.nsroot.net") ||
            localHostOrDomainIs(host, "obmsitcvpn.hk.hibm.hsbc") ||
            localHostOrDomainIs(host, "ccib-nj.i-deal.com") ||
            localHostOrDomainIs(host, "intranet.documentmailbox.com") ||
            localHostOrDomainIs(host, "branchportal.consumerbankchina.citigroup.net") ||
            localHostOrDomainIs(host, "www.webaccess-bursamalaysia.com")  ||
            localHostOrDomainIs(host, "mpd.compelling-content.com")  ||
            localHostOrDomainIs(host, "salesmanagement.consumerhongkong.citigroup.net") ||
            dnsDomainIs(host, ".asiatechnology.citigroup.net") ||
            dnsDomainIs(host, ".singaporetechnology.citigroup.net") ||
            dnsDomainIs(host, "ato.citicorp.com") ||
            dnsDomainIs(host, ".rservices.com") ||
            dnsDomainIs(host, ".in.apac.nsroot.net") ||
            dnsDomainIs(host, ".thirdparty.apac.nsroot.net") ||
            dnsDomainIs(host, "xnet.bi.go.id") ||
            dnsDomainIs(host, "sedona.leggmason.com") ||
            dnsDomainIs(host, ".finiti.info") ||
            dnsDomainIs(host, "asone.safe") ||
            dnsDomainIs(host, "bopbank.safe") ||
            host == "127.0.0.1"                               ||
            host == "localhost"                               ||
            host == "172.80.80.107"          ||
	    host == "172.19.103.114"  ||
            host == "172.19.103.115"  ||
            host == "172.19.103.116"  ||
            host == "172.19.103.117"  ||
            host == "169.187.129.200"  ||
            host == "169.187.194.50"  ||
            host == "169.187.229.218"  ||
            host == "163.37.165.202"  ||
	    host == "169.187.194.46" ||
	    host == "169.187.229.216" ||
	    host == "169.187.129.219" ||
	    host == "169.187.194.57" ||
	    host == "169.187.229.210" ||
	    host == "169.187.129.201" ||
	    host == "159.127.127.43" ||
	    host == "65.90.239.21" ||
	    host == "65.90.239.22" ||
	    host == "172.19.4.212" ||
	    localHostOrDomainIs(host, "cvreutersstage.ny.ssmb.com")  ||
	    localHostOrDomainIs(host, "cvreuters.ny.ssmb.com")  ||
	    localHostOrDomainIs(host, "cvreutersstreaming.smb.com")  ||
	    localHostOrDomainIs(host, "cvreuterscg.ny.ssmb.com")  ||
	    localHostOrDomainIs(host, "www.b2bxchange.com.my")  ||
	    localHostOrDomainIs(host, "www.b2c.com.my")  ||
	    localHostOrDomainIs(host, "employeeportal.citifinancialjapan.citigroup.net")  ||
	    localHostOrDomainIs(host, "eudrc.tradeweb.com")  ||
            localHostOrDomainIs(host, "spfin172.speedpay.com") ||
            localHostOrDomainIs(host, "spfin151.speedpay.com") ||
            localHostOrDomainIs(host, "spfin63.speedpay.com") ||
            localHostOrDomainIs(host, "spcom09.speedpay.com") ||
            localHostOrDomainIs(host, "spcom11.speedpay.com") ||
            localHostOrDomainIs(host, "spcom15.speedpay.com") ||
            localHostOrDomainIs(host, "spcom25.speedpay.com") ||
            localHostOrDomainIs(host, "ftp2.speedpay.com") ||
            localHostOrDomainIs(host, "nja76.speedpay.com") ||
            localHostOrDomainIs(host, "reports.speedpay.com") ||
            localHostOrDomainIs(host, "spfin01-uk.speedpay.com") ||
            localHostOrDomainIs(host, "sptest02-uk.speedpay.com") ||
            localHostOrDomainIs(host, "emapu327.sinuat.sg.citicorp.com") ||
            localHostOrDomainIs(host, "gwmssouat.apac.nsroot.net") ||
            localHostOrDomainIs(host, "gwmtcon-sg.apac.nsroot.net") ||
            localHostOrDomainIs(host, "gwmtconuat-sg.apac.nsroot.net") ||
            localHostOrDomainIs(host, "gwmtcon-hk.apac.nsroot.net") ||
            localHostOrDomainIs(host, "gwmtconuat-hk.apac.nsroot.net") ||
            localHostOrDomainIs(host, "leadtracking.consumerhk.citigroup.net") ||
            localHostOrDomainIs(host, "certificationsystem.consumerbankhongkong.citigroup.net") ||
            localHostOrDomainIs(host, "citiphone.consumerhongkong.citigroup.net") ||
            localHostOrDomainIs(host, "ehub.sgx.com") ||
	    localHostOrDomainIs(host, "sgxprime.sgx.com") ||
            localHostOrDomainIs(host, "sgxprimetest.sgx.com") ||
            localHostOrDomainIs(host, "sgxprimeuat.sgx.com") ||
            localHostOrDomainIs(host, "secure.bgctrader.sg") ||
            localHostOrDomainIs(host, "secure.bgctrader.hk") ||
	    localHostOrDomainIs(host, "automation.thankyou.com") ||
            localHostOrDomainIs(host, "citibusiness.apac.nsroot.net") ||
            localHostOrDomainIs(host, "uatcitibusiness.apac.nsroot.net") ||
            localHostOrDomainIs(host, "devcitibusiness.apac.nsroot.net") ||
            dnsDomainIs(host, "3000xtra.glbl1.reuters.com") ||
            dnsDomainIs(host, "3000xtra1.glbl1.reuters.com") ||
            dnsDomainIs(host, "knowledge.reuters.net") ||
            dnsDomainIs(host, ".members.equilend.com") ||
            dnsDomainIs(host, ".hk.metlifeasia.com") ||
	    dnsDomainIs(host, ".gcb.hk.citicorp.com") ||
	    dnsDomainIs(host, "datadownloadtempcob.ssmb.com") ||
	    dnsDomainIs(host, ".citidirectonline.citidirect.com") ||
            dnsDomainIs(host, ".citidirectonlinebanking.citidirect.com") ||
            dnsDomainIs(host, "creditcontrolsystem.citidirect.com") ||
            dnsDomainIs(host, "creditcontrolsystemcob.citidirect.com") ||
	    dnsDomainIs(host, "technology.gcghk.apac.nsroot.net") ||
	    shExpMatch(host, "166.73.3.*") ||
	    host.substring(0,11) == "172.19.148." ||
	    shExpMatch(host, "63.240.180.*") ||
	    shExpMatch(host, "147.146.*.*") ||
	    host == "170.186.203.18" ||
            host == "10.32.25.201" ||
            host.substring(0,7) == "165.203" ||
	    localHostOrDomainIs(host, ".epsilon.com") ||
	    localHostOrDomainIs(host, "tyusmagent.thankyou.com") ||
	    localHostOrDomainIs(host, "tyusmagentuat.thankyou.com") ||
	    localHostOrDomainIs(host, "tyusmagentfut.thankyou.com") ||
	    localHostOrDomainIs(host, "ctx.ukcipn.tpebroking.com") ||
	    localHostOrDomainIs(host, "shpu18.aspac.citicorp.com") ||
	    localHostOrDomainIs(host, "saixu118.apac.nsroot.net") ||
	    localHostOrDomainIs(host, "pcss1.aspac.citicorp.com") ||
            localHostOrDomainIs(host, "ssmhk.apac.nsroot.net") ||
	    localHostOrDomainIs(host, "uecolapp.apac.nsroot.net") ||
	   (dnsDomainIs(host, ".citigroup.net")		&&
	    url.substring(0,5) == "https")		||
            shExpMatch(url, "https://*.ssmb.com*")      ||
            shExpMatch(url, "https://*.nsroot.net*")      ||
	    shExpMatch(host, "*-pkr.apac.nsroot.net") ||
 	    shExpMatch(host, "*-ukr.apac.nsroot.net") ||
	    shExpMatch(host, "*-rkr.apac.nsroot.net") ||
	    shExpMatch(host, "*-ckr.apac.nsroot.net") ||
            dnsDomainIs(host, "ilife4.metlife.com.hk") ||
            dnsDomainIs(host, "rps.e2e.metlife.com.hk") ||
            dnsDomainIs(host, "rps.metlife.com.hk") ||
            dnsDomainIs(host, "ilife4.dr.metlife.com.hk") ||
	    dnsDomainIs(host, "tfssrvr.lavatrading.com") ||
	    dnsDomainIs(host, "tfsprxy.lavatrading.com") ||
	    dnsDomainIs(host, "solar.lavatrading.com") ||
	    dnsDomainIs(host, "solar.prod.lava") ||
	    dnsDomainIs(host, "portal.lavatrading.net") ||
	    dnsDomainIs(host, "reactor.lavatrading.com") ||
	    dnsDomainIs(host, "guiweb.investor.sungard.com") ||
	    host.substring(0,12) == "169.176.124." ||
	    host.substring(0,11) == "169.165.23." ||
            dnsDomainIs(host, ".citi.net") ||
            host == "172.31.22.40" ||
            shExpMatch(host, "207.45.46.92") ||
            shExpMatch(host, "207.45.46.91") ||
            host.substring(0,10) == "129.14.42." ||
            host.substring(0,10) == "129.14.43." ||
            host.substring(0,10) == "129.14.50." ||
            host.substring(0,10) == "129.14.51." ||
            host.substring(0,11) == "163.36.253." ||
            host.substring(0,11) == "163.36.254." ||
            shExpMatch(host, "172.19.40.152") ||
            dnsDomainIs(host, "myhc.safe") ||
	    shExpMatch(host, "appcitrixgateway.citi.epsilon.com") ||
	    shExpMatch(host, "login.citi.net") ||
  	    shExpMatch(host, "logindev.citi.net") ||
	    shExpMatch(host, "loginqa.citi.net") ||
	    shExpMatch(host, "loginuat.citi.net") ||
            shExpMatch(url, "https://*.citicorp.com*"))
        return "DIRECT";

// Tradecredit.traditionasia.com
        if ( dnsDomainIs(host, "tradecredit.traditionasia.com")
	) {
	        return "DIRECT";
        }

// DIRECT connections for BANAMEX SMART servers, RFC 11146304
        if (host == "192.193.207.43"
        || host == "192.193.204.43"
        || host == "169.175.72.69"
        || host == "169.175.72.70"
        || host == "169.175.80.69"
        || host == "169.175.80.70"
        || host == "169.175.64.69"
        || host == "169.175.64.70"
        || host == "169.175.88.69"
        || host == "169.175.88.70"
        || host == "169.175.71.69"
        || host == "169.175.71.70"
        ) {
        return "DIRECT";
        }

// DIRECT connections to LOCAL and B2B DOMAINS
        if (dnsDomainIs(host, ".citiglobalbankingcollaboration.com"))
        {
        return "DIRECT";
        }

// end of DIRECT connections for BANAMEX SMART servers

// Connection to CFSC Network
// INFOMAN: 12110375
	if (dnsDomainIs(host, "intra.cfsc.net")
	|| dnsDomainIs(host, "unisenpulse.ca")
        || dnsDomainIs(host, "cfsc-b2b.net")
        || dnsDomainIs(host, ".intra.cfsc.net")
        || dnsDomainIs(host, ".unisenpulse.ca")
        || dnsDomainIs(host, ".cfsc-b2b.net")
        || dnsDomainIs(host, ".agf.ca")
	|| dnsDomainIs(host, "agf.ca")  ) {
	return "PROXY 169.171.47.85:80; PROXY 169.171.47.86:80; PROXY 169.164.52.85:80; PROXY 169.164.52.86:80";
	}

	if (host.substring(0,11) == "142.148.10.") {
	return "PROXY 169.171.47.85:80; PROXY 169.171.47.86:80; PROXY 169.164.52.85:80; PROXY 169.164.52.86:80";
	}
// End of connection to CFSC Network

// ROUTING FOR REMOTEOFFICE TO ALEVIATE LIVEMEETING ISSUES OVER VPN, RFC 11853953
        if (
        ( dnsDomainIs(host, "remoteoffice.citigroup.com")
        || dnsDomainIs(host, "remoteoffice.europe.citigroup.com")
        || dnsDomainIs(host, "remoteoffice.asia.citigroup.com")
        || dnsDomainIs(host, "remoteoffice.japan.citigroup.com")
        || dnsDomainIs(host, "remoteoffice.australiacitigroup.com") )
        &&
        (shExpMatch(myIpAddress(),"162.124.152.176")
        || shExpMatch(myIpAddress(),"169.193.3.160"))
        ) {
        return "PROXY sgproxy.apac.nsroot.net:8080";
        }
        else if ( dnsDomainIs(host, "remoteoffice.citigroup.com")
        || dnsDomainIs(host, "remoteoffice.europe.citigroup.com")
        || dnsDomainIs(host, "remoteoffice.asia.citigroup.com")
        || dnsDomainIs(host, "remoteoffice.japan.citigroup.com")
        || dnsDomainIs(host, "remoteoffice.australiacitigroup.com") )
        {
        return "DIRECT";
        }

//LAVA & STI CONNECTIONS, RFC 12271965
        if (dnsDomainIs(host, ".lava")
        || dnsDomainIs(host, ".sti")
        ) {
        return "DIRECT";
        }

// LCH Clearnet RFC 12271965
//
	if ( shExpMatch(host, "testservices.swapclear.com") ||
	shExpMatch (host, "services.swapclear.com") ||
	shExpMatch (host, "memberlive.lch.com") ||
	shExpMatch (host, "membertest.lch.com") ||
	shExpMatch(host, "194.62.172.42")||
	shExpMatch(host, "194.62.172.41") ||
	shExpMatch(host, "194.62.172.20") ||
	shExpMatch(host, "194.62.172.34"))
	{	
        return "DIRECT";
	}
// DIRECT connections to BLACKHOLE (as per SIRT Team) RFC12217484
        if (dnsDomainIs(host, "bfisback.no-ip.org")
        || dnsDomainIs(host, "butterfly.sinip.es")
        || dnsDomainIs(host, "qwertasdfg.sinip.es")
        || dnsDomainIs(host, "nab0680dc01.brinksinc.com")
        || dnsDomainIs(host, "ie.ign.com.samsistemas.com.ar")
        || dnsDomainIs(host, "INFPW03287.pwiodc.lntinfotech.com")
        ) {
        return "DIRECT";
        }

//PAC file statement to force this subnets direct access RFC 11771302
if ( host.substring(0,11) == "163.37.220." ||
     host.substring(0,11) == "163.37.236." ||
     host.substring(0,11) == "163.37.242." ||
     host.substring(0,11) == "163.37.243." ||
     host.substring(0,11) == "163.37.245." ||
     host.substring(0,11) == "163.37.249." ||
     host.substring(0,11) == "129.14.241." ||
     host.substring(0,11) == "129.14.242." ||
     host.substring(0,11) == "129.14.244." ||
     host.substring(0,11) == "129.14.245." ||
     host.substring(0,11) == "129.14.246." ||
     host.substring(0,11) == "129.14.247." 
     ) {
       return "DIRECT";
     }

// END of RFC 11771302
// 14842270
  if (shExpMatch(host, "167.204.71.10") ||
	shExpMatch(host, "167.204.71.9") ||
	shExpMatch(host, "167.204.71.47")) 
	{	
        return "DIRECT";
	}

          if (localHostOrDomainIs(host, "web006.ny.smb.com") ||
             localHostOrDomainIs(host, "www.venture-encoding.com") ||
             localHostOrDomainIs(host, "cc2000w.copelco.com") ||
             localHostOrDomainIs(host, "cc2000test.copelco.com") ||
             localHostOrDomainIs(host, "ami.copelco.com") ||
             localHostOrDomainIs(host, "nja76.speedpay.com") ||
             localHostOrDomainIs(host, "spfin58.speedpay.com") ||
             localHostOrDomainIs(host, "spfin152.speedpay.com") ||
             localHostOrDomainIs(host, "eudrc.tradeweb.com") ||
             localHostOrDomainIs(host, "nj22.speedpay.com") ||
             localHostOrDomainIs(host, "www.citidirect-online.com") ||
             localHostOrDomainIs(host, "www.citidirectonline.com") ||
             localHostOrDomainIs(host, "uk1.primerica.com") ||
             localHostOrDomainIs(host, "uk2.primerica.com") ||
             localHostOrDomainIs(host, "emea1.primerica.com") ||
             localHostOrDomainIs(host, "emea2.primerica.com") ||
             localHostOrDomainIs(host, "pol1.primerica.com") ||
             localHostOrDomainIs(host, "pol2.primerica.com") ||
             localHostOrDomainIs(host, "pol3.primerica.com") ||
             localHostOrDomainIs(host, "pol4.primerica.com") ||
             localHostOrDomainIs(host, "uktest.primerica.com") ||
             dnsDomainIs(host, ".citisolutions.primerica.com") ||
             localHostOrDomainIs(host, "pfshomet.primerica.com") ||
             localHostOrDomainIs(host, "sedona.leggmason.com") ||
             dnsDomainIs(host, "admin.payquik.com") ||
             dnsDomainIs(host, "uat1.payquik.com") ||
             dnsDomainIs(host, "uat2.payquik.com") ||
             dnsDomainIs(host, "uat3.payquik.com") ||
             dnsDomainIs(host, "uat4.payquik.com") ||
             dnsDomainIs(host, "uatdb.payquik.com") ||
             dnsDomainIs(host, "uatsh.payquik.com") ||
             host == "216.251.212.59"         ||
             host == "216.251.212.60"         ||
             localHostOrDomainIs(host, "www.citidirectonline.citibank.com") ||
             dnsDomainIs(host, ".citicorp.com") ||
             dnsDomainIs(host, ".citigroup.net") ||
             dnsDomainIs(host, ".na.abnamro.com") ||
             dnsDomainIs(host, ".tic.com") ||
             dnsDomainIs(host, ".cdcla.com") ||
             dnsDomainIs(host, ".calfedbank.com") ||
             dnsDomainIs(host, ".tti.com") ||
             dnsDomainIs(host, ".afcc.com") ||
             dnsDomainIs(host, ".travp.net") ||
             dnsDomainIs(host, ".nsroot.net") ||
             dnsDomainIs(host, "home.citi.net") ||
             dnsDomainIs(host, ".dmzroot.net") ||
             dnsDomainIs(host, ".ccmaestro.com") ||
             dnsDomainIs(host, ".cssbrowser.com") ||
             dnsDomainIs(host, ".vpn.integral.net") ||
             dnsDomainIs(host, ".vpn.citifxtrader.com") ||
             dnsDomainIs(host, "cmeeos.cme.com") ||
             dnsDomainIs(host, "cnfs.citacx.acxiom.com") ||
             dnsDomainIs(host, "csgs.citacx.acxiom.com") ||
            (dnsDomainIs(host, ".smb.com") && 
             host.toLowerCase() != "www.smb.com") ||
            (dnsDomainIs(host, ".nssmb.com") && 
             host.toLowerCase() != "www.nssmb.com") ||
            (dnsDomainIs(host, ".ssmb.com")            && 
             host.toLowerCase() != "direct.ssmb.com"     &&
             host.toLowerCase() != "www.ssmb.com")     ||
            (dnsDomainIs(host, ".robinsonhumphrey.com") &&
             host.toLowerCase() != "www.robinsonhumphrey.com") ||
            (dnsDomainIs(host, ".sbi.com")             &&
             host.toLowerCase() != "www.sbi.com"       &&
             host.toLowerCase() != "connect.sbi.com"   &&
             host.toLowerCase() != "direct.sbi.com"    &&
             host.toLowerCase() != "direct2.sbi.com"   &&
             host.toLowerCase() != "isswca1.sbi.com")  ||
	     dnsDomainIs(host, "ccib-nj.i-deal.com")    ||
             dnsDomainIs(host, "sigcardserver.fab") ||
             host == "129.14.21.237"          ||
             host == "129.14.46.135"          ||
             host == "129.14.11.197"          ||
             host == "129.14.19.28"           ||
             host == "129.14.106.155"         ||
	     host == "169.179.235.132"         ||
             host.substring(0,7) == "129.14." ||
             host.substring(0,3) == "10."     ||
             host.substring(0,7) == "168.109" || 
             host.substring(0,7) == "146.128" ||
             host.substring(0,7) == "162.124" ||
             host.substring(0,7) == "192.168" ||
             host.substring(0,7) == "150.110" ||
             host.substring(0,7) == "159.17." ||
             host.substring(0,7) == "163.38." ||
             host.substring(0,11) == "166.73.152."      ||
             host.substring(0,11) == "166.73.233."      ||
             host.substring(0,11) == "166.73.204."      ||
             host.substring(0,11) == "166.73.211.")
		return "DIRECT";

        if (dnsDomainIs(host, ".banamex.com") ||
            dnsDomainIs(host, ".banamex.com.mx") ||
            dnsDomainIs(host, ".plazabanamex.com") ||
            dnsDomainIs(host, ".plazabanamex.com.mx") ||
            dnsDomainIs(host, ".accitrade.com.mx")
            )
          return "PROXY 153.40.226.213:8444; PROXY 162.124.148.13:8444";

//PAC file statement to force this domain to only use two proxies as required by Verizon
	if ( dnsDomainIs(host, ".verizonbusiness.com") )
	{
  	return "PROXY eurdcproxy04.eur.nsroot.net:80; PROXY eurdcproxy04-1.eur.nsroot.net:80; PROXY euedcproxy04.eurdmz.dmzroot.net:80; PROXY euedcproxy04-1.eurdmz.dmzroot.net:80";
	}


        if (dnsDomainIs(host, "hofdssmobapp01.sears.com")||
            dnsDomainIs(host, "hofsunfire1.sears.com")  ||
            dnsDomainIs(host, ".intra.sears.com")       ||
            dnsDomainIs(host, ".credit.sears.com")      ||
            dnsDomainIs(host, "sunfire1.sears.com")     ||
            dnsDomainIs(host, "cbbnj19uat2.nj19.us-nj.citicorp.com")    ||
            dnsDomainIs(host, ".bpn.sears.com") ||                
            dnsDomainIs(host, ".atc.sears.com") ||                
            dnsDomainIs(host, ".ecom.sears.com")     ||           
            dnsDomainIs(host, "anakin.sears.com")    ||           
            dnsDomainIs(host, "vader.sears.com")        ||        
            dnsDomainIs(host, "expedition.sears.com")        ||        
            dnsDomainIs(host, "explorer.sears.com")        ||        
            dnsDomainIs(host, "sedona.sears.com")     ||          
            host == "166.76.83.215"          ||
            dnsDomainIs(host, "bkrphost.sears.com")
           )
          return "PROXY 162.124.146.168:7070";

	if (dnsDomainIs(host, "intranet.fab")  || 
            dnsDomainIs(host, "fabts1.fab")    ||
            dnsDomainIs(host, "fabts3.fab")    ||
            dnsDomainIs(host, "fabsqltel.fab") &&
            host.toLowerCase() != "www.fabkom.com"
	   )		
         return "PROXY 162.124.146.168:5500";

// Swiftnet RFC12515790 PR5722,5724,5726
	if (shExpMatch(host, "eba-step2.swiftnet.sipn.swift.com") ||
	     shExpMatch(host, "eba-step2-dr.swiftnet.sipn.swift.com") ||
	     shExpMatch(host, "swift-accord-archive-europe.swiftnet.sipn.swift.com") ||
	     shExpMatch(host, "euroclearnl-dv1.swiftnet.sipn.swift.com") ||
	     shExpMatch(host, "euroclearnl-dv2.swiftnet.sipn.swift.com") ||
	     shExpMatch(host, "euroclearnl-dv3.swiftnet.sipn.swift.com") ||
	     shExpMatch(host, "swift-euro1-iws.swiftnet.sipn.swift.com") ||
	     shExpMatch(host, "mas-mepsplus-mval-br.swiftnet.sipn.swift.com") ||
	     shExpMatch(host, "bita-brl.swiftnet.sipn.swift.com") ||
	     shExpMatch(host, "bma-rtgs.swiftnet.sipn.swift.com") ||
	     shExpMatch(host, "bma-rtgs-dr.swiftnet.sipn.swift.com") ||
	     shExpMatch(host, "citi-macug.swiftnet.sipn.swift.com") ||
	     shExpMatch(host, "citi-macug-back.swiftnet.sipn.swift.com") ||
	     shExpMatch(host, "nbo-rtgs.swiftnet.sipn.swift.com") ||
	     shExpMatch(host, "nbo-rtgs2.swiftnet.sipn.swift.com") ||
	     shExpMatch(host, "boi-rtgs.swiftnet.sipn.swift.com") ||
	     shExpMatch(host, "wbcl01.swiftnet.sipn.swift.com") ||
	     shExpMatch(host, "wbcl02.swiftnet.sipn.swift.com") ||
	     shExpMatch(host, "eba-step2-browse.swiftnet.sipn.swift.com") ||
	     shExpMatch(host, "hkicl-rtgs-gui.swiftnet.sipn.swift.com") ||
	     shExpMatch(host, "hkicl-rtgs-gui-dr.swiftnet.sipn.swift.com") ||
	     shExpMatch(host, "clsb-cls2.swiftnet.sipn.swift.com") ||
	     shExpMatch(host, "clsb-cls2alt.swiftnet.sipn.swift.com") ||
	     shExpMatch(host, "sarb-samos.swiftnet.sipn.swift.com") || 
	     shExpMatch(host, "sarb-samos-qa3.swiftnet.sipn.swift.com") ||
	     shExpMatch(host, "sarb-samos-qa6.swiftnet.sipn.swift.com") || 
	     shExpMatch(host, "trgt-papss.ssp.swiftnet.sipn.swift.com")
	    )
	{
	      return "PROXY rdcgtssagaa01P.eur.nsroot.net:8080;PROXY swgssmi.nam.nsroot.net:80; PROXY fdcgtssagaa02P.eur.nsroot.net:8080; PROXY swgssp1.nam.nsroot.net:80";
	}
// end of Swiftnet RFC12515790 PR5722,5724,5726

// TCSE RFC 13034684 PR 6639
if (dnsDomainIs(host, "eituat.eserve.tcseroot.net")
        || dnsDomainIs(host, "eit.eserve.tcseroot.net")
  	|| dnsDomainIs(host, "tcsereset.eserve.tcseroot.net")
){
 return "PROXY berylvdiproxy.wlb2.apac.nsroot.net:5051";
         }
// end TCSE

// Use SAG proxies for Swift UAT URLs RFC12515790 PR5723,5725,5727
	if (shExpMatch(host, "eba-step2-pilot.swiftnet.sipn.swift.com") ||
	     shExpMatch(host, "swift-euro1-iws-pilot.swiftnet.sipn.swift.com") ||
	     shExpMatch(host, "mas-mepsplus-mval-br-pilot.swiftnet.sipn.swift.com") ||
	     shExpMatch(host, "bita-brl-test.swiftnet.sipn.swift.com") ||
	     shExpMatch(host, "bma-rtgs-pilot.swiftnet.sipn.swift.com") ||
	     shExpMatch(host, "citi-macug-pilot-e.swiftnet.sipn.swift.com") ||
	     shExpMatch(host, "citi-macug-pilot.swiftnet.sipn.swift.com") ||
	     shExpMatch(host, "nbo-rtgs-test.swiftnet.sipn.swift.com") ||
	     shExpMatch(host, "nbo-rtgs-test2.swiftnet.sipn.swift.com") ||
	     shExpMatch(host, "boi-rtgs-pilot.swiftnet.sipn.swift.com") ||
	     shExpMatch(host, "mnb-vibermonitor-pilot.swiftnet.sipn.swift.com") ||
	     shExpMatch(host, "trgt-papss-cust.ssp.swiftnet.sipn.swift.com") ||
	     shExpMatch(host, "eba-step2-browse-pilot.swiftnet.sipn.swift.com") ||
	     shExpMatch(host, "hkicl-rtgs-gui-pilot-stptest.swiftnet.sipn.swift.com") ||
	     shExpMatch(host, "hkicl-rtgs-gui-pilot-simtest.swiftnet.sipn.swift.com") ||
	     shExpMatch(host, "swift-sepa-test.swiftnet.sipn.swift.com") ||
	     shExpMatch(host, "clsb-cls2-jas.swiftnet.sipn.swift.com") ||
	     shExpMatch(host, "clsb-cls2-jasalt.swiftnet.sipn.swift.com") ||
	     shExpMatch(url, "hkicl-rtgs-gui-pilot-stptest.swiftnet.sipn.swift.com/stp") ||
	     shExpMatch(url, "hkicl-rtgs-gui-pilot-simtest.swiftnet.sipn.swift.com/sim")
	    )
	{
	      return "PROXY fdcgtssagaa01u.eur.nsroot.net:80; PROXY fdcgtssagaa02u.eur.nsroot.net:80; PROXY rdcgtssagaa03u.eur.nsroot.net:80; PROXY rdcgtssagaa04u.eur.nsroot.net:80";
	}
// end of Use SAG proxies for Swift UAT URLs RFC12515790 PR5723,5725,5727


// Swiftnet RFC12515790
	if (dnsDomainIs( host, ".swiftnet.sipn.swift.com")
	    )
	{
	        return "DIRECT";
	}
// end of Swiftnet RFC12515790

	if (dnsDomainIs(host, "tcs-helpdesk.com")  ||
	    dnsDomainIs(host, ".tcs-helpdesk.com")  ||
            dnsDomainIs(host, ".ultimatix.org")  ||
	    dnsDomainIs(host, ".ultimatix.net.ultimatix.net")  ||
            dnsDomainIs(host, ".ultimatix.net")
           )
        return "PROXY 10.186.112.79:8080; PROXY proxy-svc.citicorp.com:8444";


		return "PROXY hkproxy-t1.apac.nsroot.net:8080";
    }
